package
{
	import flash.display.Sprite;
	
	import so.cuo.platform.mmedia.Mmedia;
	import so.cuo.platform.mmedia.MmediaEvent;
	
	public class InterstitialDemo extends Sprite
	{
		public var fullApid:String="";
		var mmedia:Mmedia= Mmedia.getInstance();
		public function InterstitialDemo()
		{
			super();
			if(mmedia.supportDevice){
				mmedia.setInterstitialKeys(this.fullApid);
				mmedia.addEventListener(MmediaEvent.onInterstitialReceive,onAdReceived);
				mmedia.cacheInterstitial();
			}
		}
		protected function onAdReceived(event:MmediaEvent):void
		{
			if(event.type==MmediaEvent.onInterstitialReceive){
				mmedia.showInterstitial();
			}
		}
	}
}